import request from '@/axios';

export const getList = (current, size, params) => {
  return request({
    url: '/position/expert/list',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    }
  })
}

export const getDetail = (id) => {
  return request({
    url: '/position/expert/detail',
    method: 'get',
    params: {
      id
    }
  })
}

export const remove = (ids) => {
  return request({
    url: '/position/expert/remove',
    method: 'post',
    params: {
      ids,
    }
  })
}

export const add = (row) => {
  return request({
    url: '/position/expert/submit',
    method: 'post',
    data: row
  })
}

export const update = (row) => {
  return request({
    url: '/position/expert/submit',
    method: 'post',
    data: row
  })
}


/**
 * 获取组卷专家角色列表
 * @param {*} roleName 查询
 * @returns 
 */
export const getExpertList = (roleName) => {
  return request({
    url: '/blade-system/role/expert',
    method: 'get',
    params: {
      roleName,
    },
  });
};

